package com.insigma.business.qrcode.job.dto;

import com.insigma.business.qrcode.common.vo.DescEnum;
import java.util.LinkedHashMap;
import java.util.Map;


public enum FairStatusEnum implements DescEnum {
    
    NOT_START("未开始"),

    
    IN_PROGRESS("进行中"),

    
    OFF_SHELF("下架"),

    
    FINISHED("已结束")
    ;

    FairStatusEnum(String desc) {
        this.desc = desc;
    }

    
    private String desc;

    @Override
    public String getDesc() {
        return desc;
    }

    
    public static FairStatusEnum getByEnumName(final String enumName) {
        for (FairStatusEnum element : values()) {
            if (element.name().equals(enumName)) {
                return element;
            }
        }
        return null;
    }

    
    public static Map<String,String> getName2DescMap(){

        Map<String,String> name2TitleMap = new LinkedHashMap<>();

        for (FairStatusEnum element : values()) {
            name2TitleMap.put(element.name(), element.desc);
        }

        return name2TitleMap;
    }
}
